package Core;

import javax.microedition.lcdui.Graphics;

/**
 *
 * @author Alexander Naumow
 */

public class GUIObject extends Object
{
	protected int W=0, H=0;
	protected Point coord = new Point();
	protected String name = "";

	public GUIObject(){}
	public GUIObject(int w, int h){ W = w; H = h; }

	public Point getCoord(){ return coord; }

	public int getW(){ return W; }
	public int getH(){ return H; }

	public String getName(){ return name; }
	public void   setName(String name){ this.name = name; }

	public void draw(Graphics g, int x, int y){}
	public void processKey(int key, int state){}

	public void onEvent(int event, Object param){}

	public boolean binFlag(int source, int flag){ return (source & flag) == flag; }
}
